package com.qdaily.ui.net.model;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created with IntelliJ IDEA.
 * User: Felix
 * Date: 4/29/15
 * Time: 22:16
 * QQ:74104
 * Email:lovejiuwei@gmail.com
 */
public class ArticleCover implements Parcelable {
    private String image = "";
    private String title = "";

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.image);
        dest.writeString(this.title);
    }

    public ArticleCover() {
    }

    private ArticleCover(Parcel in) {
        this.image = in.readString();
        this.title = in.readString();
    }

    public static final Parcelable.Creator<ArticleCover> CREATOR = new Parcelable.Creator<ArticleCover>() {
        public ArticleCover createFromParcel(Parcel source) {
            return new ArticleCover(source);
        }

        public ArticleCover[] newArray(int size) {
            return new ArticleCover[size];
        }
    };

    @Override
    public String toString() {
        return "ArticleCover{" +
                "image='" + image + '\'' +
                ", title='" + title + '\'' +
                '}';
    }
}
